<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>

<head>
<title>设备信息列表</title>
<script type="text/javascript">
</script>
</head>
<body>
<h2 class="title">设备信息列表
<m:permiss permiss="DEVICE_ADD">
	<m:imgA img="add" msg="添加设备信息" action="devices/EditDevices!toAdd" />
</m:permiss></h2>
<table class="list">
	<thead>
		<tr>
			<th width="16%">设备名称</th>
			<th width="10%">设备编号</th>
			<th width="10%">设备类别</th>
			<th width="8%">是否可用</th>
			<th width="14%">设备状态</th>
			<th width="14%">备注</th>
			<th width="14%">操作</th>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="devices.items">
			<tr id="pt${id }">
				<td><s:property value="deviceName" /></td>
				<td><s:property value="deviceNo" /></td>
				<td><m:property value="devicetype" /></td>
				<td><s:if test="enable == true">是</s:if><s:else>否</s:else></td>
				<td><m:property value="deviceState"/></td>
				<td><s:property value="deviceInfo" /></td>
				<td>
				<m:permiss permiss="DEVICE_EDIT">
					<m:imgA img="edit" msg="修改"
					action="devices/EditDevices!toEdit?devices.id=${id}" />
					</m:permiss>
				<s:if test="enable == true">
				<m:permiss permiss="DEVICE_OFF">
					<m:imgA img="lock" msg="禁用"
						action="devices/ListDevices!toDelete?device.id=${id}" />
				</m:permiss>
				</s:if><s:else>
				<m:permiss permiss="DEVICE_START">
						<m:imgA img="unlock" msg="启用"
						action="devices/ListDevices!toEnable?device.id=${id}"/>
				</m:permiss>
					  </s:else>
				</td>
			</tr>
		</s:iterator>
	</tbody>
</table>
<m:page value="${devices}" showSeaBar="true"/>
</body>